package com.newgrand.controller;


import com.newgrand.domain.model.I8ReturnModel;
import com.newgrand.service.ProjectInfoServer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "中台项目信息推送")
@RequestMapping("/Project")
@RestController
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class ProjectInformation {

    private final ProjectInfoServer projectInfoServer;

    @ApiOperation(value = "项目信息推送", notes = "项目信息推送")
    @RequestMapping(value = "/Send/projectInfo", method = RequestMethod.GET)
    I8ReturnModel<String> projectInfo(String phId){
        return projectInfoServer.projectInfo(phId);
    }

    @ApiOperation(value = "项目信息删除", notes = "项目信息删除")
    @RequestMapping(value = "/Send/delProjectInfo", method = RequestMethod.GET)
    I8ReturnModel<String> delProjectInfo(String phId){
        return projectInfoServer.delProjectInfo(phId);
    }

    @ApiOperation(value = "批量项目信息推送", notes = "批量项目信息推送")
    @RequestMapping(value = "/Send/projectInfoBatch", method = RequestMethod.GET)
    I8ReturnModel<String> projectInfoBatch(){
        return projectInfoServer.projectBatch();
    }


}
